package com.gjt.event.impl;

import com.gjt.annotation.ClassAnnotation;
import com.gjt.event.RootEvent;

/**
 * 更新事件
 * @author Guojt
 * @date 2024/10/29 17:25
 */
@ClassAnnotation(value = "UpdateEventImpl", id = 2)
public class UpdateEventImpl implements RootEvent {
    private String message;

    //
    public UpdateEventImpl() {
    }

    public UpdateEventImpl(String message) {
        this.message = message;
        this.onMessage(message.getClass());
    }

//    @Override
//    public void onMessage(Class<?> object) {
//        System.out.println(message);
//        System.out.println("执行更新事件的操作！");
//    }

    @Override
    public void onMessage(Class object) {
        System.out.println(message);
        System.out.println("执行更新事件的操作！");
    }
}
